/**
 * Copyright &copy; 2012-2017 <a href="https://vivo.com">vivo</a> All rights reserved.
 */
package com.vivo.fx.sys.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.vivo.fx.sys.entity.FxUserinfo;
import com.vivo.fx.sys.dao.FxUserinfoDao;

/**
 * 用户信息表Service
 * @author jyangye
 * @version 2017-12-28
 */
@Service
@Transactional(readOnly = true)
public class FxUserinfoService extends CrudService<FxUserinfoDao, FxUserinfo> {

    @Autowired
    private FxUserinfoDao fxUserinfoDao;

	public FxUserinfo get(String id) {
		return super.get(id);
	}

	public FxUserinfo getByEmpId(String empId) {
	    List<FxUserinfo> userinfoList = fxUserinfoDao.getByEmpId(empId);
	    return userinfoList.size() > 0 ? userinfoList.get(0) : null;
    }
	
	public List<FxUserinfo> findList(FxUserinfo fxUserinfo) {
		return super.findList(fxUserinfo);
	}
	
	public Page<FxUserinfo> findPage(Page<FxUserinfo> page, FxUserinfo fxUserinfo) {
		return super.findPage(page, fxUserinfo);
	}
	
	@Transactional(readOnly = false)
	public void save(FxUserinfo fxUserinfo) {
		super.save(fxUserinfo);
	}
	
	@Transactional(readOnly = false)
	public void delete(FxUserinfo fxUserinfo) {
		super.delete(fxUserinfo);
	}
	
}